package day1;

import java.util.Arrays;
import java.util.Scanner;

public class Main {
    /**
     * AB27 循环汉诺塔
     * https://www.nowcoder.com/practice/cdf0808f841748faba058c8ef538c731?tpId=308&tqId=40484&ru=/exam/oj
     */
    public static void main3(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int x = 1,y = 2;
        int MOD = 1000000007;

        for(int i = 2;i <= n;i++)  {
            int x1 = x;
            int y1 = y;
            x = (2 * y1  + 1) % MOD;
            y = ((2 * y1 + 1) % MOD + x1 + 1) % MOD;
        }

        System.out.println(x + " " + y);
    }




    /**
     * ruby和薯条
     * https://ac.nowcoder.com/acm/problem/26224
     */
    public static int n;
    public static int[] arr;
    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        int l = in.nextInt();
        int r = in.nextInt();
        arr = new int[n];
        for(int i = 0;i < n;i++) {
            arr[i] = in.nextInt();
        }
        Arrays.sort(arr);

        System.out.println(func(r) - func(l - 1));
    }

    public static long func(int x) {
        int left = 0,right = 0;
        long ret = 0;
        while(right < n) {
            // 出窗口
            while(arr[right] - arr[left] > x) {
                left++;
            }
            // 更新数据
            ret += right - left;
            // 进窗口
            right++;
        }
        return ret;
    }



    /**
     * kotori和抽卡（二）
     * https://ac.nowcoder.com/acm/problem/50044
     */
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        double ret = 1.0;
        // 数学期望公式
        for(int i = n;i >= n - m + 1;i--) {
            ret *= i;
        }
        for(int i = m;i >= 1;i--) {
            ret /= i;
        }

        for(int i = 0;i < m;i++) {
            ret *= 0.8;
        }
        for(int i = 0;i < n - m;i++) {
            ret *= 0.2;
        }
        System.out.printf("%.4f",ret);
    }
}
